{% extends 'homepage.html' %}
{% block content %}

<h2> Further refine search </h2>


<form>
<input type="hidden" name="start" value="{{info.start}}"/>
<table border="0">

<tr>
<td align=left> {{KNOWL('nf.degree', title='degree')}} <td align=left> <input type='text' name='degree' size=3 value={{info.degree}}></td>
<td align=left> {{KNOWL('nf.discriminant', title='discriminant')}} range <td align=left> <input type='text' name='discriminant' size=5 value={{info.discriminant}}></td>
<td align=left> {{KNOWL('nf.galois_group', title='Galois group')}} <td align=left> <input type='text' name='galois_group' size=3 value={{info.galois_group}}></td></tr>
<tr>
<td align=left> {{KNOWL('nf.class_number', title='class number')}} <td align=left> <input type='text' name='class_number' size=3 value={{info.class_number}}></td>
<td align=left> {{KNOWL('nf.ideal_class_group', title='class group')}} <td align=left> <input type='text' name='class_group' size=5 value={{info.class_group}}></td>
<td align=left> {{KNOWL('nf.unramified_prime', title='unramified primes')}}<td align=left> <input type='text' name='ur_primes' size=3 value={{info.ur_primes}}></td>
</tr>
<tr>
<td align=left colspan=3>Maximum number of fields to display 
<td align=left> <input type='text' name='count' value={{info.count}} size=5></td>
</tr>

<tr> 
<td align=left><button type='submit' value='refine'>Search again</button></td> 
</tr>
</table>
</form>


<h2> Results ({{info.report}})</h2>

<table border=1 cellpadding=5 class='right_align_table'>
<tr>
<th>Label</th>
<th>Polynomial</th>
<th>Discriminant</th>
<th>Galois group</th>
<th>Class group</th>
</tr>
{% for field in info.fields: %}
<tr>
<td align='left'><a href="/NumberField/{{field.label}}">{{field.label}}</a></td>
<td>{{info.format_coeffs(field.coefficients)|safe}}</td>
<td>{{field.discriminant}}</td>
<td>{{field.galois_group[3]}}</td>
{% if field.class_group==[] %}
<td> Trivial </td>
{% endif %}
{% if field.class_group!=[] %}
<td>{{field.class_group}}</td>
{% endif %}
</tr>
{% endfor %}
</table>

<a href="#" class="navlink" onclick="decrease_start_by_count_and_submit_form();return false">Previous</A>
<a href="#" class="navlink" onclick="increase_start_by_count_and_submit_form();return false">Next</A></td>



<br>
<p class="tex2jax_ignore">
Results for database query {{ info.query }}
</p>

{% endblock %}
